﻿namespace zyn_hy_login
{
    using System;
    using System.Data.SqlClient;

    public class Check_Hy_Name
    {
        public bool CheckHyName(string hy_name)
        {
            SqlConnection connection = new SqlConnection(DBCommon.strConnectstring);
            SqlCommand command = new SqlCommand("select top 1 Hy_Login_Name from hy_login_info where Hy_Login_Name='" + hy_name + "' and Hy_Zt<>'0'", connection);
            connection.Open();
            SqlDataReader reader = command.ExecuteReader();
            if (reader.Read())
            {
                reader.Close();
                connection.Close();
                return false;
            }
            reader.Close();
            connection.Close();
            return true;
        }
    }
}

